﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;

namespace NetFrameworkExtensions.BusinessLayer
{
  public interface IObjectRepository
  {
    object Create();

    object GetById(object id);

    object DeleteById(object id);

    IList GetAll();

    IList Get(IEntityFilter filter);

    //IEntityFilter CreateFilter();

    //IList GetFilters();
  }

  public interface IObjectRepository<TEntity, TIdentifier> :
    IObjectRepository
          where TEntity : class, IIdentified<TIdentifier>
      where TIdentifier : IEquatable<TIdentifier>
  {
    new TEntity Create();

    TEntity GetById(TIdentifier id);
    
    TEntity DeleteById(TIdentifier id);
  }
}
